#ifndef _FMODSound_H_
#define _FMODSound_H_

#include "FMODSystem.h"
#include "FMODError.h"

class FMODSound
{
    private:

    FMOD_SOUND * fmod_sound;
    FMOD_CHANNEL * fmod_channel;
    FMOD_SYSTEM * fmod_system;

    public:

    FMODSound(FMODSystem * sys, const char * filename)
    {
        this->fmod_system = sys->getSystem();
        FMODError::eval(FMOD_System_CreateSound(this->fmod_system, filename, FMOD_CREATESTREAM, 0, &this->fmod_sound));
    }

    ~FMODSound()
    {
        FMODError::eval(FMOD_Sound_Release(this->fmod_sound));
    }

    void play();

    void setFrequency(float freq);

    float getFrequency();
};

#endif
